package com.usian.controller;

import com.usian.pojo.User;
import com.usian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ProviderController {

    @Autowired
    private UserService userService;


    @RequestMapping("user")
    public User getUser(Integer id){
        return userService.getUser(id);
    }

    @RequestMapping("/findAll")
    public List<User> findAll(){
        return userService.findAll();
    }
}
